home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DATAUTIL
/
DBASEUT1.LZH
/
COLORSET.PRG
< prev
next >
Wrap
Text File
|
1986-10-29
|
7KB
|
234 lines
* * * * * * * * * * * * * * * * * * * *
* * Set dBASE III Plus Colors *
* * *
* * (c)Copyright 1986, by MagicSoft *
* * *
* * All Rights Reserved *
* * * * * * * * * * * * * * * * * * * *
*
* Initialize
set talk off
set color to
set format to
clear
clear gets
store .f. to error
* Define Variables
private fg, bg, bd, df, db
public color
store '' to color
store space(14) to fg
store space(7) to bg
store space(14) to bd
store space(14) to df
store space(7) to db
* Draw Screen
set color to w+
@ 0, 0 TO 24, 79 DOUBLE
@ 17, 2 TO 23, 77
@ 1, 2 TO 3, 77
@ 4, 2 TO 16, 38
@ 4, 40 TO 16, 77
@ 2, 4 SAY "dBASE III Plus Color Selection"
@ 2, 40 SAY "(pd)Public Domain 1986, by MagicSoft"
@ 5, 9 SAY "Foregrounds & Boarder"
@ 6, 3 SAY "___________________________________"
set color to +
@ 8, 14 SAY "Light Black"
set color to b+
@ 9, 14 SAY "Light Blue"
set color to g+
@ 10, 14 SAY "Light Green"
set color to bg+
@ 11, 14 SAY "Light Cyan"
set color to r+
@ 12, 14 SAY "Light Red"
set color to br+
@ 13, 14 SAY "Light Magenta"
set color to gr+
@ 14, 14 SAY "Yellow"
set color to w+
@ 15, 14 SAY "Light White"
@ 5, 54 SAY "Backgrounds"
@ 6, 41 SAY "____________________________________"
set color to w
@ 8, 56 SAY "Black"
set color to b
@ 9, 56 SAY "Blue"
set color to g
@ 10, 56 SAY "Green"
set color to bg
@ 11, 56 SAY "Cyan"
set color to r
@ 12, 56 SAY "Red"
set color to br
@ 13, 56 SAY "Magenta"
set color to gr
@ 14, 56 SAY "Brown"
set color to w
@ 15, 56 SAY "White"
set color to w+
@ 18, 22 SAY "Screen Foreground:"
@ 19, 22 SAY "Screen Background:"
@ 20, 22 SAY "Screen Boarder:"
@ 21, 22 SAY "Data Foreground:"
@ 22, 22 SAY "Data Background:"
* Accept Data
@ 18, 41 GET FG
@ 19, 41 GET BG
@ 20, 41 GET BD
@ 21, 41 GET DF
@ 22, 41 GET DB
read
* Process Data
store lower(fg) to fg
store lower(bg) to bg
store lower(bd) to bd
store lower(df) to df
store lower(db) to db
do case
case at('black',fg) > 0
note no op
case at('blue',fg) > 0
store 'B' to color
case at('green',fg) > 0
store 'G' to color
case at('cyan',fg) > 0
store 'BG' to color
case at('red',fg) > 0
store 'R' to color
case at('magenta',fg) > 0
store 'BR' to color
case at('yellow',fg) > 0
store 'GR' to color
case at('brown',fg) > 0
store 'GR' to color
case at('white',fg) > 0
store 'BGR' to color
otherwise
store .t. to error
endcase
if at('bright',fg)>0 .or. at('light',fg)>0 .or. at('bold',fg)>0 .or. at('yellow',fg)>0
store color+'+' to color
endif
store color+'/' to color
do case
case at('black',bg) > 0
note no op
case at('blue',bg) > 0
store color+'B' to color
case at('green',bg) > 0
store color+'G' to color
case at('cyan',bg) > 0
store color+'BG' to color
case at('red',bg) > 0
store color+'R' to color
case at('magenta',bg) > 0
store color+'BR' to color
case at('yellow',bg) > 0
store color+'GR' to color
case at('brown',bg) > 0
store color+'GR' to color
case at('white',bg) > 0
store color+'BGR' to color
otherwise
store .t. to error
endcase
store color+',' to color
do case
case at('black',df) > 0
note no op
case at('blue',df) > 0
store color+'B' to color
case at('green',df) > 0
store color+'G' to color
case at('cyan',df) > 0
store color+'BG' to color
case at('red',df) > 0
store color+'R' to color
case at('magenta',df) > 0
store color+'BR' to color
case at('yellow',df) > 0
store color+'GR' to color
case at('brown',df) > 0
store color+'GR' to color
case at('white',df) > 0
store color+'BGR' to color
otherwise
store .t. to error
endcase
if at('bright',df)>0 .or. at('light',df)>0 .or. at('bold',df)>0 .or. at('yellow',df)>0
store color+'+' to color
endif
store color+'/' to color
do case
case at('black',db) > 0
note no op
case at('blue',db) > 0
store color+'B' to color
case at('green',db) > 0
store color+'G' to color
case at('cyan',db) > 0
store color+'BG' to color
case at('red',db) > 0
store color+'R' to color
case at('magenta',db) > 0
store color+'BR' to color
case at('yellow',db) > 0
store color+'GR' to color
case at('brown',db) > 0
store color+'GR' to color
case at('white',db) > 0
store color+'BGR' to color
otherwise
store .t. to error
endcase
store color+',' to color
do case
case at('black',bd) > 0
note no op
case at('blue',bd) > 0
store color+'B' to color
case at('green',bd) > 0
store color+'G' to color
case at('cyan',bd) > 0
store color+'BG' to color
case at('red',bd) > 0
store color+'R' to color
case at('magenta',bd) > 0
store color+'BR' to color
case at('yellow',bd) > 0
store color+'GR' to color
case at('brown',bd) > 0
store color+'GR' to color
case at('white',bd) > 0
store color+'BGR' to color
otherwise
store .t. to error
endcase
if at('bright',bd)>0 .or. at('light',bd)>0 .or. at('bold',bd)>0 .or. at('yellow',bd)>0
store color+'+' to color
endif
* End
if error
clear
?'An error has been detected.'
?'Please be sure that the colors'
?'you specified are available.'
?
wait
do color
return
* * * * * * * * * * * * * * * * * * * * * * * * * *
* Or comment out the above lines after 'if error' *
* to use the following line as a default. This *
* would allow pressing Escape to yeild your *
* favorite color combination. *
* * * * * * * * * * * * * * * * * * * * * * * * * *
store 'W+/B,GR+/B,B' to color
endif
set color to &color
set talk on
clear
return